Value |
M/C/O |
Variable |
Set Method |
Description |
Ship From Postal / ZIP Code |
C |
ship_from_pos_code |
vsPurcha.SetShipFromPostalCode(ship_from_pos_code); |
The postal code or zip code from which items were shipped.
*Required if shipment is involved
For Canadian addresses,requires full alpha postal code for the merchant with Valid ANANAN format
|
Destination Postal / ZIP Code |
C |
ship_to_pos_code |
vsPurcha.SetShipToPostalCode(ship_to_pos_code); |
The postal code or zip code where goods will be delivered.
*Required if shipment is involved
Full alpha postal code - Valid ANANAN format if shipping to an address within Canada.
|
Destination Country Code |
C |
des_cou_code |
vsPurcha.SetDesCouCode(des_cou_code); |
Code of country where purchased goods will be delivered. Use ISO 3166-1 alpha-2 format.
*Required if it appears on the invoice for an international transaction
Invoice Discount Treatment M discount_treatment vsPurcha.SetDiscountTreatment(discount_treatment); Indicates how the merchant is managing discounts. Must be one of the following values:
0 - if no invoice level discounts apply for this invoice;
1 - if Tax was calculated on Post-Discount totals;
2 - if Tax was calculated on Pre-Discount totals.
|
Discount Amount (Invoice Level Discount) |
C |
discount_amt |
vsPurcha.SetDiscountAmt(discount_amt); |
Amount of discount (if provided at the invoice level according to the Invoice Discount Treatment)
Must be non-zero if Invoice Discount Treatment is 1 or 2.
Minimum amount is 0.00 and maximum is 999999.99
|
Freight/Shipping Amount (Ship Amount) |
C |
freight_amount |
vsPurcha.SetFreightAmount(freight_amount); |
Freight charges on total purchase.
If shipping is not provided as a line item it must be provided here, if applicable
Signed monetary amount, minus sign means 'amount is a credit', plus sign or no sign means 'amount is a debit'. Maximum without sign is 999999.99. Example -1.00 or +2.00.
|
VAT/Tax Rate (Freight/ Shipping) (Ship Tax Rate) |
C
|
gst_hst_freight_rate |
vsPurcha.SetGstHstFreightRate(gst_hst_freight_rate); |
Rate of GST (excludes PST) or HST charged on the shipping amount (in accordance with the Tax Treatment).
*If Freight/Shipping Amount is provided then this (National GST or HST) tax rate must be provided.
Monetary amount, maximum is 99.99. Such as 13% HST is 13.00 |
VAT/ Tax Amount (Freight/ Shipping) (Ship Tax Amount) |
C |
gst_hst_freight_amount
|
vsPurcha.SetGstHstFreightAmount(gst_hst_freight_amount); |
Amount of GST (excludes PST) or HST charged on the shipping amount.
If Freight/Shipping Amount is provided then this (National GST or HST) tax amount must be provided if taxTreatment is 0 or 2.
Signed monetary amount, minus sign means 'amount is a credit', plus sign or no sign means 'amount is a debit'. Maximum without sign is 999999.99. Example -1.00 or +2.00.
|
Unique VAT Invoice Reference Number |
M
|
vat_ref_num
|
vsPurcha.SetVatRefNum(vat_ref_num); |
Unique Value Added Tax Invoice Reference Number. Must be populated with the invoice number. Must not be all spaces or all zeroes.
|
Tax Treatment |
M |
tax_treatment |
vsPurcha.SetTaxTreatment(tax_treatment); |
Must be one of the following values:
0 = Net Prices with tax calculated at line item level;
1 = Net Prices with tax calculated at invoice level;
2 = Gross prices given with tax information provided at line item level;
3 = Gross prices given with tax information provided at invoice level;
4 = No tax applies (small merchant) on the invoice for the transaction |
Item Commodity Code |
C |
item_com_code[0] |
vsPurchl.SetVsPurchl(item_com_code[0], product_code[0], item_description[0], item_quantity[0], item_uom[0], unit_cost[0], vat_tax_amt[0], vat_tax_rate[0], discount_treatmentL[0], discount_amtL[0]); |
Line item Comodity Code (if this field is not sent, then productCode must be sent) |
Item Descriptor |
M |
item_description[0] |
vsPurchl.SetVsPurchl(item_com_code[0], product_code[0], item_description[0], item_quantity[0], item_uom[0], unit_cost[0], vat_tax_amt[0], vat_tax_rate[0], discount_treatmentL[0], discount_amtL[0]);
|
Line item description |
Product Code
|
M |
product_code[0]
|
vsPurchl.SetVsPurchl(item_com_code[0], product_code[0], item_description[0], item_quantity[0], item_uom[0], unit_cost[0], vat_tax_amt[0], vat_tax_rate[0], discount_treatmentL[0], discount_amtL[0]);
|
Product code for this line item – merchant’s product code, manufacturer’s product code or buyer’s product code.Typically this will be the SKU or identifier by which the merchant tracks and prices the item or service. This should always be provided for every line item. |
Quantity |
M |
item_quantity[0] |
vsPurchl.SetVsPurchl(item_com_code[0], product_code[0], item_description[0], item_quantity[0], item_uom[0], unit_cost[0], vat_tax_amt[0], vat_tax_rate[0], discount_treatmentL[0], discount_amtL[0]); |
Quantity invoiced for this line item up to 4 decimal places supported. Whole numbers are accepted.
minimum - 0.0001
maximum - 999999999999
|
Unit of Measure |
M |
item_uom[0]
|
vsPurchl.SetVsPurchl(item_com_code[0], product_code[0], item_description[0], item_quantity[0], item_uom[0], unit_cost[0], vat_tax_amt[0], vat_tax_rate[0], discount_treatmentL[0], discount_amtL[0]); |
Unit of Measure. Use
ANSI X-12 EDI Allowable Units of Measure and Codes
|
Unit Cost
|
M |
unit_cost[0] |
vsPurchl.SetVsPurchl(item_com_code[0], product_code[0], item_description[0], item_quantity[0], item_uom[0], unit_cost[0], vat_tax_amt[0], vat_tax_rate[0], discount_treatmentL[0], discount_amtL[0]);
|
Line item cost per unit. 2-4 decimal places accepted.
minimum - 0.0001
maximum - 999999.9999
|
VAT/ Tax Amount (Line Item Tax Amount) |
C
|
vat_tax_amt[0]
|
vsPurchl.SetVsPurchl(item_com_code[0], product_code[0], item_description[0], item_quantity[0], item_uom[0], unit_cost[0], vat_tax_amt[0], vat_tax_rate[0], discount_treatmentL[0], discount_amtL[0]); |
Any value-added tax or other sales tax amount. Must have 2 decimal places.
Minimum - 0.01
Maximum - 999999.99
|
VAT/Tax Rate (Line Item Tax Rate) |
M |
vat_tax_rate[0]
|
vsPurchl.SetVsPurchl(item_com_code[0], product_code[0], item_description[0], item_quantity[0], item_uom[0], unit_cost[0], vat_tax_amt[0], vat_tax_rate[0], discount_treatmentL[0], discount_amtL[0]);
|
The percentage of the sales tax. e.g. 8% PST should be 8.0. Maximum 99.99. |
Line Item Discount Treatment |
M
|
discount_treatmentL[0]
|
vsPurchl.SetVsPurchl(item_com_code[0], product_code[0], item_description[0], item_quantity[0], item_uom[0], unit_cost[0], vat_tax_amt[0], vat_tax_rate[0], discount_treatmentL[0], discount_amtL[0]);
|
Must be one of the following values:
0- if no invoice level discounts apply for this invoice;
1- if Tax was calculated on Post-Discount totals;
2- if Tax was calculated on Pre-Discount totals.
|
Discount per Line Item (Line Level Discount) |
C
|
discount_amtL[0]) |
vsPurchl.SetVsPurchl(item_com_code[0], product_code[0], item_description[0], item_quantity[0], item_uom[0], unit_cost[0], vat_tax_amt[0], vat_tax_rate[0], discount_treatmentL[0], discount_amtL[0]); |
Amount of discount, if provided for this line item according to the Line Item Discount Treatment. Must be non-zero if Line Item Discount Treatment is 1 or 2. Must have 2 decimal places.
Minimum - 0.01
Maximum - 999999.99
|